﻿/* ----------------------------------------------------------------------------
 * Copyright (c) Philip Stears 
 *
 * This source code is subject to terms and conditions of the Microsoft Public 
 * License (Ms-PL).
 * 
 * By using this source code in any fashion, you are agreeing to be bound 
 * by the terms of the Microsoft Public License.
 * 
 * To request a copy of the Microsoft Public License, send a request by email
 * to license@connectbasic.net.
 *
 * This notice must not be removed from this software.
 * ---------------------------------------------------------------------------- */

namespace ConnectBasic.Shell.Extensibility
{
    using System;
    using System.Collections.Generic;

    /// <summary>
    /// Provides access to a collection of projects.
    /// </summary>
    public interface IProjectCollection : IEnumerable<IProject>
    {
        /// <summary>
        /// Raised when a project is loaded.
        /// </summary>
        event EventHandler<ProjectEventArgs> ProjectLoaded;

        /// <summary>
        /// Gets the total number of loaded projects.
        /// </summary>
        int Count { get; }

        /// <summary>
        /// Gets the project at the specified index.
        /// </summary>
        /// <param name="index">The index of the item to get.</param>
        /// <returns></returns>
        IProject this[int index]
        {
            get;
        }
    }
}
